﻿using System;
using System.Collections.Generic;

namespace Narwhunderful.Aphelia.Framework
{

    public class UpdatableComponentComparer<T> : IComparer<T> where T : IUpdatableComponent
    {
        public virtual int Compare(T component1, T component2)
        {
            if (component1.UpdateOrder > component2.UpdateOrder) return 1;
            if (component1.UpdateOrder < component2.UpdateOrder) return -1;
            return 0;
        }
    }

}
